import axios from "axios";
const modulesA = {
    state:{
        count: [{ name: "awdawdawda", age: 18 }, { name: "adawdawda", age: 18 }]
    },
    //修改state数据
    mutations: {
        xiu(state, value) {
            state.count = value
        },
        gai(state, value, index) {
            state.count.splice(index, 1, value);
        },
    },
    //计算属性
    getters: {

    },
    //异步请求
    actions: {
        action(e) {
            axios.get("http://api.aulence.com/mydata/roles/role-info.php?goodsID=12").then(res => {
                e.commit("xiu", res.data)
            })
            // 
        }
    },
}
export {modulesA};